﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using OpenSSL.Crypto;

namespace Sicurezza.Client.Controlli
{
    public partial class ChooseEncipherAlgorithm : Form
    {
        public Cipher SymmetricAlgorithm { get; set; }

        public ChooseEncipherAlgorithm()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            if (desRadio.Checked)
                SymmetricAlgorithm = Cipher.DES_EDE3_CBC;

            if (aesRadio.Checked)
                SymmetricAlgorithm = Cipher.AES_256_CBC;

            if (blowfishRadio.Checked)
                SymmetricAlgorithm = Cipher.Blowfish_CBC;

            if (ideaRadio.Checked)
                SymmetricAlgorithm = Cipher.Idea_CBC;

            DialogResult = DialogResult.OK;
            Close();
        }

        private void button2_Click(object sender, EventArgs e)
        {
            DialogResult = DialogResult.Cancel;
            Close();
        }
    }
}
